package com.mzw.huaxiarealestatebackend.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.time.LocalTime;
import java.io.Serializable;

/**
 * (Project)实体类
 *
 * @author makejava
 * @since 2023-12-22 00:02:59
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("project")
public class Project implements Serializable {
    private static final long serialVersionUID = -88478614163232190L;

    @TableId
    private String pjtNo;

    private String cltNo;

    private String pjtName;

    private String pjtMoney;

    private String pjtBuildtime;

    private String pjtStatus;

    private String pjtFinishtime;

    private String pjtStop;

    @TableField(exist = false)
    private String cltName;

    @TableField(exist = false)
    private String pjtStatusName;

    @TableField(exist = false)
    private String pjtStopName;

    @TableField(exist = false)
    private String pjtStopStatus;



    public void resetName(String cltName){

        if (this.pjtStatus.equals("1")){
            this.setPjtStatusName("已完成");
        }else {
            this.setPjtStatusName("未完成");
        }
        this.setCltName(cltName);
        if (this.pjtStop.equals("1")){
            this.setPjtStopName("建项中");
        }else if (this.pjtStop.equals("2")){
            this.setPjtStopName("建模中");
        } else if (this.pjtStop.equals("3")) {
            this.setPjtStopName("渲染中");
        }else if (this.pjtStop.equals("4")){
            this.setPjtStopName("后期工作中");
        } else if (this.pjtStop.equals("0")) {
            this.setPjtStopName("未开始");
        }else {
            this.setPjtStopName("已完成");
        }
    }

}

